import { Define, EntityObjectFactory } from 'tiny-entity2';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
import { KitchenRefundOrderItem } from './kitchenRefundOrderItem';
@Define.Table({ TableName: 'kitchenrefundorder' })
export class KitchenRefundOrder extends EntityObjectType<KitchenRefundOrder>{
    @Define.PrimaryKey()
    id: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        IsIndex: true,
        NotAllowNULL: true
    })
    orderId: string;

    @Define.Column({
        DataType: Define.DataType.BIGINT
    })
    createTime: number;

    @Define.Column({
        DataType: Define.DataType.Decimal,
        DefaultValue: 0
    })
    totalQty;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    tableId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    tableName: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    tableZoneId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    tableZoneName: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    status: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    note: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        NotAllowNULL: true,
        IsIndex: true
    })
    storeId: string;

    @Define.Column({
        DataType: Define.DataType.BIGINT
    })
    version: number;

    @Define.Mapping({
        Mapping: 'KitchenRefundOrderItem',
        MappingKey: 'kitchenRefundOrderId'
    })
    kitchenRefundOrderItems: KitchenRefundOrderItem[];
}

export const KitchenRefundOrderStatus = {
    Init: 'init',
    Closed: 'closed'
}